﻿//-----------------------------------------------------------------------
// <copyright company="Olson Software Limited">
//      (c) Copyright Olson Software Limited.
//      This source is subject to the Microsoft Public License (Ms-PL).
//      Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
//      All other rights reserved.
// </copyright>
//-----------------------------------------------------------------------
using System;

namespace Insight.Library.Navigation
{
    /// <summary>
    /// Defines a URI to URI mapping.
    /// </summary>
    public abstract class CustomUriMapping
    {
        /// <summary>
        /// Attempts to process a Uri.  derived classes can do any processing they wish to decide if they wish to handle the URI.
        /// </summary>
        /// <param name="unmappedUri">The Uri to map</param>
        /// <param name="mappedUri">The Uri after mapping, or null if you do not wish to change to a new page</param>
        /// <returns>true to indicate the URI has been mapped (ie you want to navigate to the mapped URI parameter).
        /// false if you wish to continue processing if any other mapping is available</returns>
        public abstract bool MapUri(Uri unmappedUri, out Uri mappedUri);
    }
}
